﻿namespace System {
	class Exception {
		
		field message;

		// Stack Trace
		field _0 = null;

		constructor(message) {
			this.message = message;
		}

		property stackTrace { get { return @system_exception_serializestacktrace(this._0); } }

		// Invoke Runtime Exception
		// The start location of this method is stored in metadata.
		// When a runtime exception occurs, a synthetically-generated string value
		// is inserted into a new stack context that points the program counter
		// at this location. 
		static method _IRE(message) {
			throw new RuntimeException(message);
		}
	}

	class RuntimeException : Exception {
		constructor(message) : base(message) { }
	}
}